// Product.java
package com.example.bean;

public class Product {
    private String id;
    private String name;
    private double price;

    // 无参构造（反射创建实例必需）
    public Product() {}

    // Setter方法（用于属性注入）
    public void setId(String id) { this.id = id; }
    public void setName(String name) { this.name = name; }
    public void setPrice(double price) { this.price = price; }

    @Override
    public String toString() {
        return "Product{id='" + id + "', name='" + name + "', price=" + price + "}";
    }
}
